<template>
	<view class="index" :data-theme="theme">
		<view class="head" style="height: 200rpx;width: 100%;">
			<view style="margin: 0 26rpx;">
				<!-- <u-row> -->
				<view style="flex-flow:row;display: flex;">
					<u-icon name="home" color="#FFF" size="28"></u-icon>
					<!-- <uni-icons type="shop-filled" size="58"></uni-icons> -->
					<view style="display: flex;align-items: center;font-size: 18px;font-weight: bold;margin-left: 5px;">
						{{legalName}}
					</view>
				</view>
				<!-- </u-row> -->
			</view>
		</view>
		<view class="card" style="margin-top: -100rpx;">
			<view class="more">
				<view class='mo'>
					<view class='mo_01'>实时数据</view>
					<navigator url="/pages/user/tongji/tongji">
						<view class='mo_02'>更多 <uni-icon type="arrowright" size="15" color="#D6D6D6"></uni-icon>
						</view>
					</navigator>
				</view>
			</view>
			<view class="shuju">
				<view class="shuju_01">
					<view>今日订单/金额</view>
					<view class="shuju_01_s">{{viewModel.orderNum}} / ¥{{viewModel.sales}}</view>
				</view>
				<view class="shuju_01 no">
					<view>昨日订单/金额</view>
					<view class="shuju_01_s">{{viewModel.yesterdayOrderNum}} / ¥{{viewModel.yesterdaySales}}</view>
				</view>

				<view class="shuju_01">
					<view>今日访客数/昨日</view>
					<view class="shuju_01_s ">{{viewModel.visitorsNum}} / {{viewModel.yesterdayVisitorsNum}}</view>
				</view>
				<view class="shuju_01 no">
					<view>关注量</view>
					<view class="shuju_01_s">{{viewModel.followNum}}</view>
				</view>
			</view>

		</view>
		<view class="card">
			<view style="height: 70rpx;">
				<!-- <uNotice style="height: 100%;border-radius: 20rpx;" :textlist="textlist" interval=2000 duration=2000
					showIcon showMore color="#f19e07" background="#f7eddf"></uNotice> -->
				<uni-notice-bar show-icon scrollable :speed="70" :text="concatentText" />
			</view>
		</view>
		<view class="card" style="padding-bottom: 8rpx;">
			<view style="margin:20rpx;margin-top: 0px;">
				<u-scroll-list :indicator="false">
					<view class="scroll-list">
						<view class="scroll-list__line" v-for="(item, index) in menuArr" :key="index">
							<view class="scroll-list__line__item" v-for="(item1, index1) in item" :key="index1"
								@click="goMenuPage(item1.url)"
								:class="[(index1 === item.length - 1) && 'scroll-list__line__item--no-margin-right']">
								<!-- <image class="scroll-list__line__item__image" :src="menuBaseUrl + item1.icon" mode=""> -->
								<view style="width: 61px;height: 50px;text-align: center;">
									<image class="scroll-list__line__item__image" :src="item1.attributeList.icon"
										mode="heightFix">
									</image>
								</view>

								<text class="scroll-list__line__item__text">{{ item1.title }}</text>
							</view>
						</view>
					</view>
				</u-scroll-list>
			</view>
		</view>
		<view class="card">
			<view class="more">
				<view class='mo'>
					<view class='mo_01'>送货退货</view>
					<navigator url="/pages/user/tongji/tongji">
						<view class='mo_02'>送货规范 <uni-icon type="arrowright" size="15" color="#D6D6D6"></uni-icon>
						</view>
					</navigator>
				</view>
			</view>
			<view style="margin:20rpx;margin-top: 0px;">
				<u-scroll-list :indicator="false">
					<view class="scroll-list">
						<view class="scroll-list__line" v-for="(item, index) in menuArr2" :key="index">
							<view class="scroll-list__line__item" v-for="(item1, index1) in item" :key="index1"
								@click="goMenuPage(item1.url)"
								:class="[(index1 === item.length - 1) && 'scroll-list__line__item--no-margin-right']">
								<view style="width: 61px;height: 50px;text-align: center;">
									<image class="scroll-list__line__item__image" :src="item1.attributeList.icon"
										mode="heightFix">
									</image>
								</view>
								<text class="scroll-list__line__item__text">{{ item1.title }}</text>
							</view>
						</view>
					</view>
				</u-scroll-list>
			</view>

		</view>
		<!-- <view class="six">
			<view class="jiu_01">
				<navigator url="/pages/edit/pro_manage/pro_manage">
					<view><img src="../../imgs/6.png" /></view>
					<view>商品管理</view>
				</navigator>
			</view>
			<view class="jiu_01">
				<navigator url="/pages/order/order">
					<view><img src="../../imgs/8.png" /></view>
					<view>订单管理</view>
				</navigator>
			</view>
			<view class="jiu_01">
				<navigator url="/pages/edit/shop/shop">
					<view><img src="../../imgs/5.png" /></view>
					<view>门店编辑</view>
				</navigator>
			</view>
			<view class="jiu_01">
				<navigator url="/pages/user/tongji/tongji"> 
					<view><img src="../../imgs/date.png" /></view>
					<view>经营数据</view>
				</navigator>
			</view>
			<view class="jiu_01">
				<navigator url="/pages/couponlist/couponlist">
					<view><img src="../../imgs/yhq.png" /></view>
					<view>优惠券</view>
				</navigator>
			</view>
			<view class="jiu_01 ">
				<navigator url="/pages/kehu/kehu">
					<view><img src="../../imgs/people.png" /></view>
					<view>客户管理</view>
				</navigator>
			</view> 
			<view class="jiu_01 ">
				<navigator url="/pages/evaluate/evaluate">
					<view><img src="../../imgs/4.png" /></view>
					<view>评价管理</view>
				</navigator>
			</view>
			<view class="jiu_01 ">
				<navigator url="/pages/poster/poster">
					<view><img src="../../imgs/poster.png" /></view>
					<view>海报生成</view>
				</navigator>
			</view> 
			<view class="jiu_01 ">
				<navigator url="/pages/templace/templace">
					<view><img src="../../imgs/yfmb.png" /></view>
					<view>运费模板</view>
				</navigator>
			</view> 
			<view class="jiu_01 " >
				<navigator url="/pages/certification/one/one">
					<view><img src="../../imgs/sjrz.png" /></view>
					<view>商家入驻</view>
				</navigator>
			</view>
		</view>
		<view class="BH"></view>
		<view class="more">
			<view class='mo'>
				<view class='mo_01'>广告直通车 
					 </view>
				<view class='mo_02'></view>
			</view>
		</view> -->
		<!-- 		<view class="list">
			<view class="list_01" @click="jump_choose">商家选择</view>
			<view class="list_01">来源于如花开源商城系统: www.ruhuashop.com</view>
		</view> -->

		<view style="margin: 20px;text-align: center;font-size: 18px;color:#aaa;">小羊驼</view>
		<!-- <view class="H50"></view> -->

		<!-- 弹窗 -->
		<view v-if="tancl">
			<Tan @close_add="tan"></Tan>
		</view>
	</view>
</template>

<script>
	import {
		viewModelApi
	} from '../../api/dashboard.js'
	// ----------
	import utils from '@/utils/util.js';
	import uNotice from '../../components/u-notice/u-notice.vue'
	import {
		mapGetters
	} from "vuex";
	import {
		toLogin
	} from '@/libs/login.js';
	import uniBadge from "@/components/uni/uni-badge/uni-badge.vue"
	import uniIcon from "@/components/uni/uni-icon/uni-icon.vue"
	import Tan from "@/components/qy/Tan.vue"
	import animationType from '@/utils/animationType.js';
	import UniSection from '@/components/uni/uni-swipe-action/uni-swipe-action.vue';
	import {
		getBasicApi,
		basicUpdateApi
	} from "@/api/merchant.js"
	let app = getApp();
	export default {
		computed: mapGetters(['isLogin', 'uid', 'chatUrl', "userInfo", 'globalData', 'userInfo']),
		components: {
			'uni-section': UniSection,
		},
		data() {
			return {
				theme: app.globalData.theme,
				// textlist: [{
				// 		title: '我们提供优质产品和服务持续优化业务',
				// 	},
				// 	{
				// 		title: '诚招合作商户加入我们的合作伙伴团队',
				// 	},
				// 	{
				// 		title: '致力于为客户提供高品质的产品和服务',
				// 	},
				// ],
				concatentText: '', //轮播消息
				legalName: '未认证', //公司名称
				menuBaseUrl: 'https://cdn.uviewui.com/uview/menu/',
				menuArr: [
					[{
							name: '商品管理',
							icon: '11.png'
						},
						{
							name: '库存管理',
							icon: '9.png'
						}, {
							name: '营销活动',
							icon: '17.png'
						}, {
							name: '商机推荐',
							icon: '2.png'
						}, {
							name: '价格分析',
							icon: '3.png'
						},
					],
					[{
							name: '财务对账',
							icon: '8.png'
						},
						{
							name: '订单明细',
							icon: '10.png'
						}, {
							name: '售后管理',
							icon: '18.png'
						}, {
							name: '开票管理',
							icon: '15.png'
						}, {
							name: '违规记录',
							icon: '16.png'
						},
					],
					[{
						name: '经营分析',
						icon: '6.png'
					}, {
						name: '改善清单',
						icon: '13.png'
					}, {
						name: '质检管理',
						icon: '14.png'
					}]
				],
				menuArr2: [
					[{
							name: '票证上传',
							icon: '../../imgs/poster.png'
						},
						{
							name: '寄售送货',
							icon: '9.png'
						}, {
							name: '备货参考',
							icon: '17.png'
						}, {
							name: '标签打印',
							icon: '2.png'
						}, {
							name: '送货签到',
							icon: '3.png'
						},
					],
					[{
							name: '交货进度',
							icon: '11.png'
						},
						{
							name: '退库取回',
							icon: '9.png'
						}
					],
				],
				menus: [{
						"id": 63532,
						"title": "常用服务",
						"url": null,
						"code": "781276c0-acf4-47b3-b089-0fff2972146c",
						"sort": 1,
						"type": 1,
						"createTime": 1698661661,
						"menus": [{
								"id": 51675,
								"title": "商品管理",
								"url": "/pages/product/productLlist/productLlist",
								"code": "04c253a1-483d-418c-bef5-b982a1e0542e",
								"sort": 1,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/goods/audit/index,/packages/goods/audit-edit/index,/packages/goods/brand-select/index,/packages/goods/brand-apply/index,/packages/goods/list/index,/packages/goods/detail/index,/packages/goods/list-search/index,/packages/goods/list-result/index,/packages/goods/goods-edit/index,/packages/goods/goods-select/index,/packages/goods/goods-result/index,/packages/goods/publish/index,/packages/goods/we-cropper-upload/index,/packages/goods/publish/children/success/index,/packages/goods/publish/children/preview/index,/packages/goods/publish/children/editSpu/index,/packages/goods/publish/children/editSku/index,/packages/goods/category-select/index,/packages/goods/white-image/index,/packages/goods/title-rename/index,/packages/goods/tax-rate/index,/packages/reuse-product-qualification/index,/packages/modify-price/index,/packages/goods-movie/recorder/index,/packages/goods-movie/edit-video/index,/packages/goods-movie/edit-video-result/index,/packages/goods2/goods-medical/index,/packages/goods2/qualification-batch/index,/packages/goods2/edit-sku/index,/packages/goods2/edit-detail/index,/packages/goods2/goods-publish/index,/packages/goods2/detail/index,/packages/goods2/goods-change/index,/packages/goods2/goods-change/children/success/index,/packages/goods-next/pages/seekAdvice/list/index,/packages/goods-next/pages/seekAdvice/detail/index,/packages/goods-next/pages/seekAdvice/consult/index,packages/goods2-backup/goods-publish/index,packages/goods2-backup/goods-change/index,packages/goods2-backup/edit-sku/index,packages/goods2-backup/edit-detail/index,packages/goods2-backup/goods-change/children/success/index,/packages/goods2/common/pages/edit-sku/index,/packages/goods2/common/pages/edit-detail/index",
									"icon": "https://p0.meituan.net/travelcube/dc7e1aa8f03d42575c88f70daaa728295812.png",
									"value": "goods"
								}
							}, {
								"id": 53020,
								"title": "库存管理",
								"url": "/pages/goodsAndDepot/goodsAndDepot",
								"code": "96b82317-c54b-4e77-892b-719ab95bde94",
								"sort": 2,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/inventory/index/index,/packages/inventory/update/index,/packages/inventory/preference-settings/index,/packages/inventory/back-up/index/index,/packages/inventory/back-up/update/index,/packages/inventory/back-up/preference-settings/index,/packages/inventory-management-settings/index",
									"icon": "https://p0.meituan.net/travelcube/602164a4f68be4644ae8e2b57d2dcb6a4396.png",
									"value": "inventory"
								}
							}, {
								"id": 55098,
								"title": "营销活动",
								"url": "/pages/marketing/marketing",
								"code": "f20b580e-1535-44f3-a857-c0eef60cb291",
								"sort": 3,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/activity-center/home-page/index,/packages/activity-center/activity-detail/index,/packages/activity-center/choose-goods/index,/packages/activity-center/create-success/index,/packages/activity-center/promotion-configuration/index,/packages/activity-center/agreement-detail/index,/packages/activity-center/money-off-configuration/index,/packages/activity-center/money-off-detail/index,/packages/activity-center/seckill-confirm/index,/packages/activity-center/money-off-choose/index,/packages/activity-center/money-off-search/index,/packages/activity-center/promotion-search/index,/packages/activity-center/seckill-submit/index,/packages/activity-center/seckill-info/index,/packages/activity-center/with-gift-configuration/index,/packages/activity-center/choose-category/index,/packages/activity-center/explosive-goods/home-list/index,/packages/activity-center/explosive-goods/apply-list/index,/packages/activity-center/explosive-goods/detail/index,/packages/activity-center/explosive-goods/choose-goods/index,/packages/activity-center/explosive-goods/activity-configuration/index,/packages/activity-center/explosive-goods/activity-goods-edit/index,/packages/activity-center/explosive-goods/configuration-success/index,/packages/activity-center/explosive-goods/goods-detail/index,/packages/activity-center/explosive-goods/sign-up/index,/packages/activity-center/automatic-adjust-price/index,/packages/activity-center/explosive-goods/activity-effects-detail/index",
									"icon": "https://p0.meituan.net/travelcube/22d9c38c2f8ab4ac1277f0955b9d14885683.png",
									"value": "mbc"
								}
							},
							{
								"id": 72525,
								"title": "商品推荐",
								"url": "/pages/goodsRecommed/recommedList/recommedList",
								"code": "a1b7d8c9-9c61-4301-9755-92b999260c1d",
								"sort": 4,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/goods-recommend/index/index,/packages/goods-recommend/search/index,/packages/goods2/goods-recommend-detail/index,/packages/goods-recommend/top-search-keyword-list/index,/packages/goods-recommend/top-search-keyword-detail/index,/packages/goods-recommend/marketing-goods-list/index",
									"icon": "https://p1.meituan.net/travelcube/13c855c0e02412b6752d5791d0275f144109.png",
									"value": "recommendgoods"
								}
							}, {
								"id": 52795,
								"title": "价格分析",
								"url": "/packages/price-competitiveness/index/index?source=1",
								"code": "4c16bd05-0d35-4813-9861-4c2d5a62d6a9",
								"sort": 5,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/price-competitiveness/list/index,/packages/price-competitiveness/detail/index,/packages/suggest-price/index,/packages/modify-price/index,/packages/price-competitiveness/index/index,/packages/price-competitiveness/activity/index",
									"icon": "https://p0.meituan.net/travelcube/cdb74ef13cf3b7963ad6f4b89dd2ae4a6675.png",
									"new-url": "/packages/price-competitiveness/index/index?source=1",
									"value": "priceanalysis"
								}
							}, 
							{
								"id": 52396,
								"title": "财务对账",
								"url": "/pages/finance/financeList/financeList",
								"code": "c7af682d-00b9-49a1-891d-bc1c2f26aaae",
								"sort": 6,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/bill-manage/index,/packages/bill-detail-list/index,/packages/bill-detail-list-platform-loan/index,/packages/bill-detail-list-platform-loan-search/index,/packages/bill-charts-datepicker/index,/packages/arrival-detail/index,/packages/trade-detail/index,/packages/trade-detail-platform-loan/index,/packages/state-tip/index,/packages/arrival-list/index,/packages/download-bill/index,/packages/deposit-account/index,/packages/dynamic-details/index,/packages/arrears-record/index,/packages/material-deposit-account/index,/packages/select-date/index,/packages/bill-manage/calendar-page/index,/packages/bill-manage/pages/bill-detail/index,/packages/bill-manage/pages/responsibility-compensate-detail-list/index,/packages/bill-manage/pages/home-page/index,/packages/bill-manage/pages/platform-loan-detail-list/index",
									"icon": "https://p0.meituan.net/travelcube/6cb5575748f2e9825c71b4cb0e683cd22524.png",
									"value": "finance"
								}
							}, {
								"id": 52757,
								"title": "订单明细",
								"url": "/pages/orderDetail/orderList/orderList",
								"code": "7671ee06-0485-4a80-a6f7-6acd1bffd941",
								"sort": 7,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/order-management/list/index,/packages/order-management/detail/index",
									"icon": "https://p0.meituan.net/travelcube/7355a0fe59a9e51c4b7a143e8040ef922059.png",
									"value": "order"
								}
							}, {
								"id": 52788,
								"title": "售后管理",
								// "url": "/pages/aftermarket/aftermarketManagement/aftermarketManagement",
								"url": "/pages/orderMarket/orderList/orderList",
								"code": "84f4b7fd-473f-4f74-98d9-25e04a9bc92b",
								"sort": 8,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/after-sales-appeal/index,/packages/after-sales-audit-detail/index,/packages/after-sales-collect/index,/packages/after-sales-consult-record/index,/packages/after-sales-detail/index,/packages/after-sales-list/index,/packages/after-sales-record/index,/packages/after-sales-reject/index,/packages/after-sales-assistant/home/index,/packages/after-sales-assistant/guide/index,/packages/quality-level-control/detail/index,/packages/after-sales-detail/pages/all-detail/index,/packages/after-sales-list/pages/quality-daily-report/index,/packages/after-sales-list/pages/goods-quality-grade/index,/packages/after-sales-list/pages/quality-grade-detail/index,/packages/after-sales-list/pages/upload-material/index",
									"icon": "https://p1.meituan.net/travelcube/581f2549d68bfc13e194606c3f9bf3191950.png",
									"value": "aftersales"
								}
							}, {
								"id": 52794,
								"title": "开票管理",
								"url": "/pages/invoice/invoiceList/invoiceList",
								"code": "c2e7a7d6-3269-442d-bdeb-2842ec4cfc67",
								"sort": 9,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/ticket-manage/index,/packages/ticket-detail/index,/packages/ticket-done-list/index,/packages/ticket-search/index,/packages/ticket-manage/pages/ticket-info/index,/packages/ticket-manage/pages/ticket-check/index,/packages/ticket-manage/pages/ticket-search/index,/packages/ticket-manage/pages/invoice-check/index",
									"icon": "https://p0.meituan.net/travelcube/472ab1bac385195f67e158a01a63d1971835.png",
									"value": "invoice"
								}
							}, {
								"id": 55304,
								"title": "违规记录",
								"url": "/pages/violation/violationMessage/violationMessage",
								"code": "5f2a9870-938e-45f6-bbd2-50071c5d47f4",
								"sort": 10,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/violation/violation-info/index,/packages/violation/violation-appeal/index,/packages/violation/appeal-info/index,/packages/violation/rule-introduction/index",
									"icon": "https://p1.meituan.net/travelcube/2da0ae30a49126b647be168882c7f54f2058.png",
									"value": "wrongdoing"
								}
							},
							// {
							// 	"id": 72217,
							// 	"title": "店铺分",
							// 	"url": "/packages/seller-grow-up/index/index",
							// 	"code": "177a85ac-ddd7-4a44-946e-e5768f7904d7",
							// 	"sort": 11,
							// 	"type": 1,
							// 	"createTime": 1698661661,
							// 	"menus": [],
							// 	"attributeList": {
							// 		"pages": "/packages/seller-grow-up/index/index",
							// 		"icon": "https://p1.meituan.net/travelcube/64c195fbc64b555a3d152990eeba2a9b2820.png",
							// 		"value": "shopscore"
							// 	}
							// }, {
							// 	"id": 54863,
							// 	"title": "经营分析",
							// 	"url": "/packages/operate-data/main/index",
							// 	"code": "6e296107-21ea-44c6-a99c-e34a3735bab4",
							// 	"sort": 12,
							// 	"type": 1,
							// 	"createTime": 1698661661,
							// 	"menus": [],
							// 	"attributeList": {
							// 		"pages": "/packages/operate-data/main/index,/packages/operate-data/rank-all/index,/packages/operate-data/rank-detail/index",
							// 		"icon": "https://p0.meituan.net/travelcube/7e2cdebeb902b890c791e40c99571e7b2136.png",
							// 		"value": "ba"
							// 	}
							// }, {
							// 	"id": 83943,
							// 	"title": "改善清单",
							// 	"url": "/packages/improve-list/index/index",
							// 	"code": "3e71e909-df95-417b-a42c-6f62e0871538",
							// 	"sort": 13,
							// 	"type": 1,
							// 	"createTime": 1698661661,
							// 	"menus": [],
							// 	"attributeList": {
							// 		"pages": "/packages/improve-list/index/index,/packages/improve-list/detail/index,/packages/improve-list/process-learning/index,/packages/improve-list/process-learning-operate/index",
							// 		"hidden": "false",
							// 		"icon": "https://p0.meituan.net/travelcube/d012d11cd9ebc47877dd047c3cf51a852260.png",
							// 		"hidden-white-account": "mt18791347311,kltwc2,kltwc3,mt100472e"
							// 	}
							// }, 
							{
								"id": 97314,
								"title": "质检管理",
								"url": "/pages/qualityTesting/qualityTestingManagement/qualityTestingManagement",
								"code": "30eaf777-ac7f-4a8b-bc12-bc89aef12018",
								"sort": 14,
								"type": 1,
								"createTime": 1698661661,
								"menus": [],
								"attributeList": {
									"pages": "/packages/quality-control/index/index,/packages/quality-control/quality-check-detail/index",
									"icon": "https://p0.meituan.net/travelcube/c532beeb0b510441572b80a4865581923050.png",
									"value": "quality"
								}
							}
						],
						"attributeList": {
							"isShowBigVajra": "true",
							"cardNum": "15",
							"isShowTitle": "false"
						}
					},
					{
						"id": 63533,
						"title": "送货退货",
						"url": null,
						"code": "a8f6ec7c-98ca-4696-966d-58d79dd14bd1",
						"sort": 2,
						"type": 1,
						"createTime": 1698661661,
						"menus": [{
							"id": 72856,
							"title": "寄售送货",
							"url": "/pages/consignSale/consignSaleList/consignSaleList",
							"code": "576d1802-83ae-4180-9dec-0a0e28c3eda4",
							"sort": 2,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"pages": "/packages/delivery-list/index/index,/packages/delivery-list/goods-list/index,/packages/delivery-list/order-detail-new/index",
								"icon": "https://p1.meituan.net/travelcube/569aefae958a32cd1d6358bad7b5066d2061.png",
								"value": "consignment"
							}
						}, {
							"id": 51676,
							"title": "标签打印",
							"url": "/pages/labelPrinting/labelPrinting",
							"code": "f74f6ba7-9cf6-4932-bdb8-74aec20ecbca",
							"sort": 4,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"deliveryAgentUrl": "/packages/transfer-page-group/delivery-agent/index?pageType=labelPrint",
								"pages": "/packages/label-printer/index,/packages/label-printer/printer-setting/index,/packages/label-printer/printer-supplement/index,/packages/label-printer-help/index,/packages/warehouse-list/index,/packages/warehouse-wave-list/index,/packages/label-printer/printer-successful/index,/packages/label-printer/parcel-query/index,/packages/label-printer/parcel-nosale-print/index,/packages/label-printer/extral-detail/index,/packages/label-printer/print-container/index,/packages/label-printer/sku-printer-config/index,/packages/transfer-page-group/delivery-agent/index",
								"icon": "https://p0.meituan.net/travelcube/387dfd512b4f9f052f4eb90ea9a128341909.png",
								"value": "label"
							}
						}, {
							"id": 56507,
							"title": "送货签到",
							"url": "/pages/scheduledDelivery/scheduledDelivery",
							"code": "cb4e405e-d3c3-49f2-858a-2f89b9652033",
							"sort": 6,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"deliveryAgentUrl": "/packages/transfer-page-group/delivery-agent/index?pageType=deliverySignIn",
								"pages": "/packages/delivery-sign-in/index/index,/packages/delivery-sign-in/detail/index,/packages/delivery-sign-in/record/index,/packages/delivery-signin-detail/index,/packages/transfer-page-group/delivery-agent/index,/packages/yoda-modules/modules/index/index",
								"icon": "https://p0.meituan.net/travelcube/89b2277c63e5b4cc923e59ff4c2cab712528.png",
								"value": "delivery"
							}
						}, {
							"id": 51677,
							"title": "退库取回",
							"url": "/pages/cancellingStock/cancellingList/cancellingList",
							"code": "6c42e0bf-2a55-4bce-868e-187a9eb73bd1",
							"sort": 9,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"pages": "/packages/return-stock/index,/packages/return-stock-add/index,/packages/return-stock-detail/index,/packages/return-stock-search/index,/packages/return-stock-select/index",
								"icon": "https://p1.meituan.net/travelcube/759f7bd91d879a4d047a7ad429841fc81691.png",
								"value": "stockreturn"
							}
						}, {
							"id": 56003,
							"title": "票证上传",
							"url": "/pages/ticketUpload/index",
							"code": "012a27ea-d00a-4bd5-bab6-90d845d2c742",
							"sort": 1,
							"type": 2,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"pages": "/packages/goods-ticket-manage/ticket-list/index,/packages/goods-ticket-manage/upload-ticket/index,/packages/goods-ticket-manage/history-ticket/index,/packages/goods-ticket-manage/upload-ticket-guide/index",
								"icon": "https://p0.meituan.net/travelcube/83ad50bd57df09ef750668482ad7d96c1965.png",
								"value": "Ticket"
							}
						}, {
							"id": 51672,
							"title": "备货参考",
							"url": "/pages/stockingReference/stockingList/stockingList",
							"code": "a69069c2-fc0d-4964-93a5-26bd1b487dd9",
							"sort": 3,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"pages": "/packages/sales-list-new/index,/packages/sales-list-new-backup/index",
								"icon": "https://p0.meituan.net/travelcube/6809d3fe83bcd637ca2cab04958c874b2192.png",
								"value": "stock"
							}
						}, {
							"id": 66861,
							"title": "装筐送货",
							"url": "/pages/frameUpDelivery/index",
							"code": "bf1b7b91-5ade-4003-a8ab-982b585cf61c",
							"sort": 5,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"deliveryAgentUrl": "/packages/transfer-page-group/delivery-agent/index?pageType=sendPackage",
								"pages": "/packages/send-package/index/index,/packages/send-package/update/index,/packages/send-package/detail/index,/packages/send-package/scanCode/index,/packages/send-package/updateScan/index,/packages/send-package/scanCodeOld/index,/packages/send-package/scanDevice/index,/packages/send-package-backup/index/index,/packages/send-package-backup/update/index,/packages/send-package-backup/detail/index,/packages/send-package-backup/scanCode/index,/packages/send-package-backup/updateScan/index,/packages/send-package-backup/scanCodeOld/index,/packages/transfer-page-group/delivery-agent/index",
								"icon": "https://p0.meituan.net/travelcube/b1004b4cc348f075c5e17cf74e6e9ce72043.png",
								"value": "sp"
							}
						}, {
							"id": 56240,
							"title": "物资交接",
							"url": "/packages/material-handover/index",
							"code": "5ad8158b-19f7-4be7-835b-e897ee1760ca",
							"sort": 7,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"pages": "/packages/material-handover/index",
								"icon": "https://p0.meituan.net/travelcube/8dad88f2e881d849ca2d4b630b98dc8f1814.png",
								"value": "material"
							}
						}, {
							"id": 56506,
							"title": "交货进度",
							"url": "/pages/deliverySchedule/deliveryList/deliveryList",
							"code": "52aff4e7-7b4f-49bc-9a63-84d9c9208275",
							"sort": 8,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"deliveryAgentUrl": "/packages/transfer-page-group/delivery-agent/index?pageType=deliverySchedule",
								"pages": "/packages/delivery-schedule/index,/packages/delivery-schedule/detail/index,/packages/delivery-schedule/pages/replenishment/index,/packages/delivery-schedule/record/index,/packages/transfer-page-group/delivery-agent/index",
								"icon": "https://p0.meituan.net/travelcube/d0c761623dc0df04974d3090bd42a2362234.png",
								"value": "schedule"
							}
						}, {
							"id": 96647,
							"title": "周转物资",
							"url": "/pages/materials/index",
							"code": "e6a5629f-c8c0-4471-a7fe-e9088250aac9",
							"sort": 11,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"pages": "/packages/replenishment/supplier/index",
								"icon": "https://p0.meituan.net/travelcube/a1f64a4ac3df021c453d437572250f1c2071.png",
								"value": "replenishment"
							}
						}, {
							"id": 54491,
							"title": "预约签到",
							"url": "packages/asn/index/index",
							"code": "7c0a8c05-d69d-47aa-b014-20b081b2b0b2",
							"sort": 10,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"pages": "/packages/asn/index/index,/packages/asn/detail/index,/packages/asn/appraise/index,/packages/asn/preview-detail/index,/packages/asn/preview/index,/packages/asn/result/index",
								"hidden": "true",
								"icon": "https://p0.meituan.net/travelcube/d9d50de7313324324cc29fccfe84ae103224.png"
							}
						}, {
							"id": 96647,
							"title": "兜底补货",
							"url": "/packages/replenishment/supplier/index",
							"code": "e6a5629f-c8c0-4471-a7fe-e9088250aac9",
							"sort": 11,
							"type": 1,
							"createTime": 1698661661,
							"menus": [],
							"attributeList": {
								"pages": "/packages/replenishment/supplier/index",
								"icon": "https://p0.meituan.net/travelcube/a1f64a4ac3df021c453d437572250f1c2071.png",
								"value": "replenishment"
							}
						}],
						"attributeList": {
							"isShowBigVajra": "false",
							"cardNum": "10",
							"isShowTitle": "true"
						}
					}
				],
				tancl: false,
				shop: {},
				// ----------
				viewModel: {
					sales: "0", //今日销售额
					yesterdaySales: "0", //昨日销售额
					orderNum: 0, //今日订单量
					yesterdayOrderNum: 0, //昨日订单量
					visitorsNum: 0, //今日访客数
					yesterdayVisitorsNum: 0, //昨日访客数
					followNum: 1 //关注量
				}, //实时数据首页概览
			}


		},
		components: {
			uniIcon,
			uniBadge,
			Tan,
			// uNotice,
		},
		onLoad() {
			// 界面数据初始化
			this._load()

			let textlist = [{
					title: '我们提供优质产品和服务持续优化业务',
				},
				{
					title: '诚招合作商户加入我们的合作伙伴团队',
				},
				{
					title: '致力于为客户提供高品质的产品和服务',
				},
			];
			this.concatentText = textlist.map(item => item.title).join(' ');
			this.getUserInfoName();
		},
		onShow() {
			// 验证是否登录,拦截并跳转登录
			if (!this.isLogin) {
				toLogin();
				return false;
			}
			// 未提交入驻申请
			if (!this.userInfo.isShopVerify) {
				let that = this;
				uni.showModal({
					title: '提示',
					content: "提交入驻申请后可以开启全部功能哦",
					showCancel: true,
					confirmText: '去完成',
					success(res) {
						if (res.confirm) {
							uni.navigateTo({
								url: '/pages/certification/one/one',
							})
						} else if (res.cancel) {
							//退出当前用户
							that.$store.dispatch('GETLOGOUT');
						}
					}
				})
			}
		},
		methods: {
			_load() {
				this.shop = this.$api.json.count_order;
				// 1.加载目录菜单数据*
				// 2.格式化数据
				this.menuArr = utils.splitArray(this.menus[0].menus, 5);
				this.menuArr2 = utils.splitArray(this.menus[1].menus, 5);
				// ----------------------
				if (!this.isLogin) {
					return false;
				}
				// 加载实时数据首页概览
				this.loadViewModel();
			},
			loadViewModel() {
				let that = this;
				viewModelApi().then(res => {
					let data = res.data;
					that.viewModel = data;
				}).catch(err => {
					console.log("loadViewModel error", err)
				});
			},
			getUserInfoName() {
				getBasicApi().then((res) => {
					if (res.data.legalName == null) {
						this.legalName = '未认证'
					} else {
						this.legalName = res.data.legalName
					}
				})

			},
			// -------------------
			//跳转界面
			goMenuPage(url) {
				// if (this.isLogin) {
				uni.navigateTo({
					animationType: animationType.type,
					animationDuration: animationType.duration,
					url
				})
				// }
			},

			//弹窗
			tan() {
				this.tancl = !this.tancl
			},
			//扫码
			shao() {
				uni.scanCode({
					onlyFromCamera: true,
					success: function(res) {
						uni.navigateTo({
							url: 'pages/edit/yanzheng/yanzheng?code=' + res.result
						})
					}
				});
			},
			jump_choose() {
				uni.navigateTo({
					url: '/pages/choose/choose'
				})
			}
		},

	}
</script>


<style lang="scss">
	.card {
		margin: 0 20rpx 20rpx 20rpx;
		background-color: #fff;
		border-radius: 20rpx;
	}

	.scroll-list {
		@include flex(column);

		&__show-more {
			background-color: #fff0f0;
			border-radius: 3px;
			padding: 3px 6px;
			@include flex(column);
			align-items: center;

			&__text {
				font-size: 12px;
				width: 12px;
				color: #f56c6c;
				line-height: 0px;
			}
		}

		&__line {
			@include flex;
			margin-top: 22rpx;

			&__item {
				display: flex;
				flex-direction: column;
				margin-right: 11px;

				&__image {
					width: 61px;
					height: 48px;
				}

				&__text {
					margin-top: 0px;
					color: $u-content-color;
					font-size: 12px;
					text-align: center;
				}

				&--no-margin-right {
					margin-right: 0;
				}
			}
		}
	}

	.index {
		.H50 {
			height: 50px;
		}

		.head {

			text-align: center;
			padding: 20rpx 0 20rpx;
			color: #fff;
			font-size: 14px;
		}

		.jiu {
			padding: 10px;
			display: flex;
			flex-wrap: wrap;
			color: #fff;
		}

		.jiu_01 {
			width: 33%;
			text-align: center;
			padding: 15px 10px 15px;
			box-sizing: border-box;
			font-size: 12px;
		}

		.jiu_01 img {
			width: 32px;
			height: 32px;
			margin-bottom: 10px;
		}

		.mo {
			padding: 10px;
			display: flex;
			justify-content: space-between;
			border-bottom: 1px solid #f0f0f0;
			line-height: 20px;
		}

		.mo_01 {
			padding-left: 10px;
			box-sizing: border-box;
			width: 80%;
			height: 20px;
			overflow: hidden;
			border-left: 3px solid;
			font-size: 14px;
			font-weight: bold;
			// border-color: $main-color-theme4;
		}

		.mo_01 span {
			color: #8E8E8E;
			font-weight: 100;
			font-size: 12px;
			padding-left: 10px;
		}

		.mo_02 {
			color: #D6D6D6;
		}

		.shuju {
			display: flex;
			flex-wrap: wrap;
		}

		.shuju_01 {
			width: 50%;
			text-align: center;
			padding: 5px 10px;
			box-sizing: border-box;
			font-size: 14px;
			line-height: 25px;
			font-size: 14px;
			border-right: 1px solid #f0f0f0;
			border-bottom: 1px solid #f0f0f0;
		}

		.shuju_01_s {
			color: #EB511B;
			font-weight: 800;
			font-size: 16px;
		}

		.no {
			border-right: none;
		}

		.BH {
			background-color: #F1F1F1;
			height: 5px;
		}

		.six {
			padding: 10px;
			display: flex;
			flex-wrap: wrap;
		}

		.list_01 {
			padding: 15px 10px 8px;
			border-bottom: 1px solid #F4F4F4;
			font-size: 12px;
		}
	}

	// head background-color
	.head {
		@include index-gradient(theme);
		// background: linear-gradient(to bottom, #ff79a4, #fa436a);
	}

	// left_color
	.mo_01 {
		@include border_color(theme);
	}
</style>